package com.zhenzhang.myblog.entity;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import java.util.Date;
import java.util.List;

@Data
@NoArgsConstructor
public class Article {
    private Integer id = 0;
    private Integer aid = 0;
    @NotBlank
    private String title = "";
    private List<String> type;
    private String cover = "";
    @NotBlank
    private String content = "";
    private Date created_at;
    private Date updated_at;
    private Integer likes = 0;
    private String username = "";
    private Integer editing = 0;

    @JsonProperty("abstract")
    private String abstract0 = "";
}